<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>兜瓣电影</title>
    <link rel="shortcut icon" href="{%static "img/favicon.ico" %}" />
    <link rel="stylesheet" href="{% static 'css/main.css' %}">
    <link rel="stylesheet" href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" >
    <script src="https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script>
        $(document).ready(function () { //实现懒加载
            $("#index a").click(function () {
                var id= $(this).attr("href");
                id = id + " img";
                $(id).each(function () {
                    if(($(this).offset().top+$(this).width()/2)<$(window).height()) {
                        $(this).attr("src", $(this).attr("x-src"));
                    }
                });
            });
        });
    </script>
    {% block T_head %}
    
    {% endblock %}
</head>
<body>

<div class="content">
    <div class="row">
                <nav>
                    <div class="container">
                    <ul class="nav nav-pills ">
                            <li class="nav-item navbar-left" id="index" >
                                <a class="navbar-brand" href="{% url 'movie:index' %}">兜瓣电影</a>
                            </li>
                        {% if user.is_authenticated %}
                           <li class="dropdown navbar-right">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                           {{ user.username }}<b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu nav" id="dropdown_menu_nav">
                                <li><a id="is_login" href="{% url 'movie:user_scored' user_id=user.id %}">我的评价</a></li>
                                <li><a href="{% url 'logout' %}?next={% url 'movie:index' %}">退出</a></li>
                            </ul>
                           </li>
                        {% else %}
                            <li class="nav-item navbar-right">
                                <a class="navbar-link" href="{% url 'login' %}">登录/注册</a>
                            </li>
                        {% endif %}
                    </ul>
                    </div>
                </nav>
        </div>

{% block T_body %}

{% endblock %}
</div>
<div class="footer">
    <p align="center">&copy;2019 基于图卷积神经网络的推荐系统 zqy</p>
</div>

</body>


</html>